Unload

Entity-Related Operation Statement

Syntax samples

UNLOAD <expression> {IFF <Boolean expression>}

UNLOAD 5

UNLOAD 5 IFF Entity() = EntA

Description

Unloads a certain quantity of entities, or a certain quantity of those entities depending on a condition. Use UNLOAD to unload entities from a carrier entity that was previously loaded with LOAD. The unloaded entities are processed ahead of the entity which unloaded them. Each unloaded entity searches ahead in the process list, and then from the beginning of the list, until a process is found for that entity type at that location.

Valid In

The operation column of process edit tables only. UNLOAD is not valid at conveyors, after routing, or at the end of a queue. You may not use UNLOAD in combination with COMBINE, CREATE, GROUP, UNGROUP, and SPLIT AS or other UNLOAD in the same process logic. If the process contains LOAD statements, UNLOAD can only appear once after all of them.

Components

<expression>

The number of entities to unload. A value of zero is ignored and a negative value produces an error. If the quantity specified for unloading is greater than the number of entities that have been loaded, the extra quantity is ignored. This expression is evaluated every time the statement is encountered.

IFF <Boolean expression>

This option allows the UNLOAD command to be conditional. Any attributes, entity functions, and location functions apply to the entity to be unloaded, not to the base entity. This technique allows only entities with certain properties to be unloaded from the base entity. To use attributes, entity functions, and location functions that apply to the base entity, assign the desired value to a local variable and use the local variable in the Boolean expression.

Explicit Entity Actions

UNLOAD divides up costs and copies statistical information accrued while loaded, to each unloading entity.

Example

The following example is a continuation of the LOAD statement example and shows how the loaded entity (Truck) is unloaded, resulting in the original Truck and the boxes that were loaded onto it. Boxes continue to the next location while Truck is returned to its starting location, Factory. (See the Load statement example.)

Process Table

Entity

Location

Operation (min)

Box

Shipping

WAIT 2 min

Truck

MfgSite

 

Truck

Dock

LOAD Attr1 IN 2 Hr

Truck

NewYork

WAIT T(20,30,60)

UNLOAD 5

Box

NewYork

 

Truck

Chicago

WAIT T(20,30,60)

UNLOAD 5

Box

Chicago

 

Truck

Boston

WAIT T(20,30,60)

UNLOAD 5

Box

Boston

 

Routing Table

Blk

Output

Destination

Rule

Move Logic

1

Box

Dock

LOAD 1

MOVE FOR 45 sec

1

Truck

Dock

FIRST 1

MOVE FOR 10 min

1

Truck

NewYork

FIRST 1

MOVE FOR 24 Hr

Truck

Chicago

FIRST

MOVE FOR 12 Hr

Truck

Boston

FIRST

MOVE FOR 28 Hr

1

Truck

MfgSite

FIRST 1

MOVE FOR 24 Hr

1

Box

NY_Recv

FIRST 1

MOVE FOR 5 min

1

Truck

MfgSite

FIRST 1

MOVE FOR 12 Hr

1

Box

Chi_Recv

FIRST 1

MOVE FOR 5 min

1

Truck

MfgSite

FIRST 1

MOVE FOR 28 Hr

1

Box

Bos_Recv

FIRST 1

MOVE FOR 5 min

See Also

LOAD, COMBINE, JOIN, GROUP, and UNGROUP. Also see Attributes for more information.